{template 'common/header'}
<link rel="stylesheet" href="../addons/kuyuan_red/dist/web/common.css" />
<link rel="stylesheet" href="../addons/kuyuan_red/dist/web/media-check.css" />
<div id="louie" data-url="{php echo $this->createWebUrl('api')}">

    <form ref="batchForm" action="" method="pist" @submit.prevent>
        <table id="list" class="table table-hover">
            <tr>
                <td>选择</td>
                <th>用户id</th>
                <th>昵称</th>
                <th>类型</th>
                <th>素材</th>
                <th>上传时间</th>
                <th>操作</th>
            </tr>
            <tr v-for="item in list">
                <td><label style="display: block;"><input type="checkbox" name="batch" :value="item.id+'|'+item.type" /></label></td>
                <td>{{item.uid}}</td>
                <td>{{item.nickname}}</td>
                <td><span v-if="item.type === 'image'">图片</span><span v-else>视频</span></td>
                <td>
                    <img v-if="item.type === 'image'" class="media" :src="item.media" @click="clickMedia(item.type,item.media)" />
                    <img v-else class="media" :src="item.media" @click="clickMedia(item.type,item.video)" />
                </td>
                <td>{{item.time}}</td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <button type="button" class="btn btn-info" @click="pass(item.id)">通过审核</button>
                        <button type="button" class="btn btn-danger" @click="del(item.id,item.type)">删除</button>
                    </div>
                </td>
            </tr>
            <tr v-if="list.length > 1">
                <td><label style="display: block;"><input type="checkbox" @click="selectAll" /> 全选</label></td>
                <td colspan="6"><button class="btn btn-success btn-sm" type="button" @click="batchSubmit('pass')">批量通过</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="btn btn-danger btn-sm" type="button" @click="batchSubmit('del')">批量删除</button></td>
            </tr>
            <tr class="empty" v-if="total <= 0"><td colspan="7">暂无可审核素材</td></tr>
        </table>
    </form>
    <page v-on:change-page="changePage" v-bind:total="total" v-bind:return-num="returnNum"></page>

    <media-view :type="media_type" :media="media" v-if="media_show" @close="media_show = false"></media-view>

    <!--提示框--><v-dialog style="z-index:99999999;"/>
</div>
<script src="../addons/kuyuan_red/dist/web/common.js"></script>
<script src="../addons/kuyuan_red/dist/web/media-check.js"></script>
{template 'common/footer'}